- 
                Notifications
    
You must be signed in to change notification settings  - Fork 26
 
Fix application profile link mess #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix application profile link mess #410
Conversation
1f33f26    to
    219c536      
    Compare
  
    5feb822    to
    1c8f00e      
    Compare
  
    | 
           Woah, this is a lot to take on! Thank you for working on this! Haven't looked at the code yet but just going on the description: 
  | 
    
1c8f00e    to
    3301815      
    Compare
  
    
          
 That's fine. Rename  
 There is compatible concern. My original idea is: 
 To achieve above compatible, updated idea would become: 
 That is,   | 
    
| 
           Makes sense to me!  I definitely think that, depending on the application profile setting, we should make only the   | 
    
3301815    to
    b8fa716      
    Compare
  
    | 
           Update as below: 
  | 
    
| 
           In targets.json is also this parameter Lines 32 to 33 in 722c2f1 
 I'm not sure if this has an use case at this moment.  | 
    
56d3a96    to
    f164549      
    Compare
  
    
          
 The added   | 
    
a658bfc    to
    08624c0      
    Compare
  
    This provides one approach to address cmake link mess with
mbed-core-flags/mbed-rtos-flags whose links or not depends on selected
application profile, full or bare-metal.
1.  Add target config option application-profile for application to
    select which application profile to use. Applications are responsible
    for making this target config option consitent with link selection of
    mbed-os/mbed-baremetal.
2.  Overload mbed-core-flags/mbed-core-sources so that they can involve
    mbed-rtos-flags/mbed-rtos-sources or not depending on
    target.application-profile setting
    …remetal This guards from mismatch of target.application-profile and link libraries mbed-os/mbed-baremetal.
With mbed-core-flags overloaded to match target.application-profile setting, all libraries should link mbed-core-flags instead of mbed-rtos-flags so that they build upon correct application profile, involving mbed-rtos-flags or not.
With mbed-core-flags/mbed-core-sources being overloaded to match target.application-profile setting, mbed-os should link only mbed-core-flags/mbed-core-sources which will involve mbed-rtos-flags/ mbed-rtos-sources as config.
MBED_GREENTEA_TEST_BAREMETAL can become deprecated and be removed. The 'auto' option of target.application-profile needn't respect it.
MBED_GREENTEA_TEST_BAREMETAL can become deprecated and be removed. Respect target.application-profile setting instead to resolve link library.
08624c0    to
    c35976f      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making this fix!
Summary of changes
This PR tries to address #407, including:
mbed-core-flags/mbed-rtos-flagswhose links or not depends on selected application profile,fullorbare-metal.application-profilefor application toselect which application profile to use. Applications are responsible
for make this target config option consitent with link selection of
mbed-os/mbed-baremetal.
mbed-application-profile-flags. It is tosubstitute for mbed-core-flags/mbed-rtos-flags. Library camke targets
should change to link this one to build upon correct application profile
selection.
mbed-application-profile-flagsinstead ofmbed-core-flags/mbed-rtos-flagsto build upon correct application profile.Impact of changes
To link mbed-baremetal,
target.application-profilemust be set tobare-metalin mbed_app.json5.Pull request type